package com.kfyang.manualgear.dao;

import com.kfyang.manualgear.annotation.Dao;
import com.kfyang.manualgear.annotation.crud.Construct;
import com.kfyang.manualgear.annotation.crud.Query;
import com.kfyang.manualgear.annotation.crud.ResultMap;
import com.kfyang.manualgear.entity.PlainEntity;

@Dao
public interface ResultMapDao {
    @Query(col = {"id", "name", "password", "image_url", "role"},
        value = "from plain where id = {id}")
    @ResultMap({"id", "name", "password", "imageUrl", "role"})
    PlainEntity selectResultMap(int id);

    @Query(col = {"id", "name", "password", "image_url", "role"},
        value = "from plain where id = {id}")
    @Construct("plainCt")
    PlainEntity selectConstruct(int id);
}
